import { api } from "../utils/instance";
import type { Account } from "../views/LoginPage.vue";

// 获取首页数据
export const getHomeData = () => {
  return api.get("prod/index");
};

// 获取分类数据
export const getCategoryData = () => {
  return api.get("/prod/cate");
};

// 获取购物车数据
export const getCartData = () => {
  return api.get("user/querycar");
};

// 获取用户数据
export const getProfileData = () => {
  return api.get("user/profile");
};

// 获取用户订单数据
export const getMyOrder = () => {
  return api.get("user/order",{uid:1,pageSize:10,pageNumber:1},{'userid': '1'});
};

//登录
export const Login = (data: Account) => {
	return api.post<Account>("user/login", data)
}
